<template>
  <div class="register-box">
    <el-form
      :model="mercForm"
      :rules="mercRules"
      v-loading="loading"
      ref="mercForm"
      size="small"
      label-position="right"
      label-width="160px"
    >
      <el-row :gutter="20">
        <el-col :span="24">
          <el-form-item label="渠道商户编号:" prop="mercId">
            <el-input
              class="haruyuki-width-100"
              type="text"
              v-model="mercForm.mercId"
              :disabled="disabled"
              placeholder="请输入渠道商户编号"
            ></el-input>
          </el-form-item>
          <el-form-item label="APPID:" prop="appid" v-if="aisleCode=='A0000014'">
            <el-input
              class="haruyuki-width-100"
              type="text"
              v-model="mercForm.appid"
              :disabled="disabled"
              placeholder="请输入APPID"
            ></el-input>
          </el-form-item>

          <el-form-item label="商户APPID:" prop="mercAppid" v-if="aisleCode=='A0000032'||aisleCode=='A0000044'">
            <el-input
              class="haruyuki-width-100"
              type="text"
              v-model="mercForm.mercAppid"
              :disabled="disabled"
              placeholder="请输入APPID"
            ></el-input>
          </el-form-item>
          <el-form-item label="通道平台商户私钥:" prop="mercPrivate" v-if="aisleCode=='A0000032'">
            <el-input
              class="haruyuki-width-100"
              type="text"
              v-model="mercForm.mercPrivate"
              :disabled="disabled"
              placeholder="请输入通道平台商户私钥"
            ></el-input>
          </el-form-item>
          <el-form-item label="通道平台商户公钥:" prop="mercPublic" v-if="aisleCode=='A0000032'">
            <el-input
              class="haruyuki-width-100"
              type="text"
              v-model="mercForm.mercPublic"
              :disabled="disabled"
              placeholder="请输入通道平台商户公钥"
            ></el-input>
          </el-form-item>
          <el-form-item label="通道商户签名密钥:" prop="mercKey" v-if="aisleCode=='A0000038'||aisleCode=='A0000044'">
            <el-input
              class="haruyuki-width-100"
              type="text"
              v-model="mercForm.mercKey"
              :disabled="disabled"
              placeholder="请输入通道商户签名密钥"
            ></el-input>
          </el-form-item>
          <el-form-item label="通道商户token:" prop="mercToken" v-if="aisleCode=='A0000044'">
            <el-input
              class="haruyuki-width-100"
              type="text"
              v-model="mercForm.mercToken"
              :disabled="disabled"
              placeholder="请输入通道商户签名密钥"
            ></el-input>
          </el-form-item>
          <el-form-item label="商户终端号:" prop="mercTerminalNo" v-if="aisleCode=='A0000049'">
            <el-input
              class="haruyuki-width-100"
              type="text"
              v-model="mercForm.mercTerminalNo"
              :disabled="disabled"
              placeholder="请输入商户终端号"
            ></el-input>
          </el-form-item>
          <el-form-item label="经度:" prop="lng" v-if="aisleCode=='A0000049'">
            <el-input
              class="haruyuki-width-100"
              type="number"
              v-model="mercForm.lng"
              :disabled="disabled"
              placeholder="请输入经度"
            ></el-input>
          </el-form-item>
          <el-form-item label="纬度:" prop="lat" v-if="aisleCode=='A0000049'">
            <el-input
              class="haruyuki-width-100"
              type="number"
              v-model="mercForm.lat"
              :disabled="disabled"
              placeholder="请输入纬度"
            ></el-input>
          </el-form-item>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>

<script>
export default {
  props: {
    mercForm: {
        type: Object,
        default: () => {
            return {
                mercId: "",
                appid: ""
            }
        }
    },
    aisleCode:{
      type: String,
      default: ''
    },
    disabled: {
      type: Boolean,
      default: false,
    },
    rpiNo: {
      type: String,
      default: ""
    },
    regType: {
      type: String,
      default: ""
    }
  },
  components: {
  },
  data() {
    return {
      labelData: {
        merchantTitle: "商户信息",
        contentTitle: "",
      },
      loading: false,
      aisleList: [],
    //   mercForm: {
    //     mercId:  "",
    //   },
      mercRules: {
        mercId: [{ required: true, message: "请输入渠道商户编号", trigger: "blur" }],
        mercAppid: [{ required: true, message: "请输入商户APPID", trigger: "blur" }],
        mercPrivate: [{ required: true, message: "请输入通道平台商户私钥", trigger: "blur" }],
        mercPublic: [{ required: true, message: "请输入通道平台商户公钥", trigger: "blur" }],
        mercKey: [{ required: true, message: "请输入通道商户签名密钥", trigger: "blur" }],
        mercToken: [{ required: true, message: "请输入通道商户token", trigger: "blur" }],
        mercTerminalNo: [{ required: true, message: "请输入", trigger: "blur" }],
        lng: [{ required: true, message: "请输入", trigger: "blur" }],
        lat: [{ required: true, message: "请输入", trigger: "blur" }]
      },
      isShow: true,
    };
  },
  computed: {
  },
  watch: {
    
  },
  created() {
  },
  methods: {
    // /* 获取通道列表数据 */
    // getAisleInfo() {
    //   const _this = this;
    //   queryBasicAisleList(_this.mercForm.rpiNo).then((res) => {
    //     _this.aisleList = res.data.data;
    //   });
    // },
  },
};
</script>

<style lang="scss" scoped>
.register-box {
  padding: 20px;
}
.alter-title {
  font-size: 16px;
  font-weight: bold;
  margin-left: 20px;
}

.upload-img {
  overflow: hidden;
  background-color: #fff;
  border: 1px solid #c0ccda;
  border-radius: 6px;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  width: 148px;
  height: 148px;
  margin: 0 8px 8px 0;
  display: inline-block;
}
</style>